package homework_03;

import java.util.Scanner;

/**
 * 评定成绩等级
 */
public class Test_02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入分数：");
        double score = sc.nextDouble();//考虑0.5分，不影响评级
        switch ((int)score/10){
            case 0:         //0~5均为E
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
                System.out.println("E");
                break;
            case 6:
                System.out.println("D");
                break;
            case 7:
                System.out.println("C");
                break;
            case 8:
                System.out.println("B");
                break;
            case 9:
            case 10:
                System.out.println("A");
                break;
            default:
                System.out.println("请输入正确的分数");
        }
    }
}
